package business;

public class MathBusiness {

	public static int calcularFatorial(int numero){
		int result = numero;
		System.out.println(result);
		System.out.println("*********");
		for(int i = numero-1; i > 0 ; i--){
			System.out.println(i + "*" +result);
			result = result * i;
			System.out.println(result);
		}
		System.out.println("*********");
		return result;
	}
	
	public static boolean isPrimo(int numero) {
		int count = 0;
		if(numero==0){
			return false;
		}
		if(numero<2){
			return true;
		}
		for (int i = 1; i <= numero; i++) {
			if (numero % i == 0) {
				count++;
			}
		}
		if (count > 2) {
			return false;
		}
		return true;
	}

}
